<div id="house-manage-view">
  <div class="page">
    <div class="al-list-container">
      <form class="form-horizontal al-search-container" role="form">
        <div class="form-group">
          <label class="control-label col-sm-2">公寓</label>
          <div class="col-sm-2" ng-if="apartmentList.length>0">
            <qgy-apartment-item pick-apartment="pickApartment()"
                apm-data="pick" apm-list="apartmentList"></qgy-apartment-item>
          </div>
          <label class="control-label col-sm-2">楼栋</label>
          <div class="col-sm-2">
            <select ng-model="pick.buildingId"
                    class="form-control" ng-change="pickBuilding()"
                    ng-options="option.id as option.name for option in buildingList"></select>
          </div>
          <label class="control-label col-sm-2 ">楼层</label>
          <div class="col-sm-2">
            <select ng-model="pick.floor"
                    class="form-control" ng-change="pickFloor()"
                    ng-options="option.id as option.name for option in floorList"></select>
          </div>
        </div>
      </form>
      <div class="floor-info">
        <div class="house-status-tips">
          <div class="house-status appoint"><div class="color-square"></div>已预订</div>
          <div class="house-status renting"><div class="color-square"></div>已入住</div>
          <div class="house-status unavailable"><div class="color-square"></div>维修中</div>
          <div class="house-status available"><div class="color-square"></div>可出租</div>
          <button class="btn btn-warning al-fl-rt" ng-click="doRefresh()">刷新</button>
        </div>
        <div class="floor-plan-container" ng-mouseleave="clearFloatInfo()" ng-if="pick.floorData && pick.floorData.thumb!='房态图'">
          <div id="dynamic-room-{{item.id}}" class="dynamic-room draggable ui-widget-content" ng-style="roomStyle(item)"
               ng-class="{1:'rentable',2:'rented',4:'unavailable',8:'appoint'}[item.status]"
               ng-mouseover="mouseoverHouse(item)"
               data-ng-click="goHouseDetail(item)"
               ng-repeat="item in houseList" ng-if="item.status!=0">
            <span id="house-item-{{item.id}}" class="room-name ab-house-item"
                  ng-class="{'current':(pick.roomData && pick.roomData.id==item.id)}">{{item.houseNo}}</span>
          </div>
          <img ng-src="{{pick.floorData.thumb}}">
          <div class="float-info" ng-if="floatHouseInfo && floatHouseInfo.ngStyle" ng-style="floatHouseInfo.ngStyle">
            <div class="title">
              {{floatHouseInfo.houseNo}}
              <span ng-if="floatHouseInfo.contractStatus>=0">({{floatHouseInfo.peopleNum}}人)</span>
              <button class="btn btn-primary btn-sm" ng-click="doOffCheckIn(floatHouseInfo)"
                      ng-if="floatHouseInfo.status==1">线下入住</button>
              <button class="btn btn-info btn-sm" ng-click="doOnCheckIn(floatHouseInfo)"
                      ng-if="floatHouseInfo.status==8 && floatHouseInfo.contractStatus==4">线上入住</button>
              <button class="btn btn-success btn-sm" ng-click="earnestCheckIn(floatHouseInfo)"
                      ng-if="floatHouseInfo.status==8 && floatHouseInfo.depositBillId">定金入住</button>
              <!--<button class="btn btn-primary btn-sm" ng-click="doOffLease(floatHouseInfo)"-->
                      <!--ng-if="floatHouseInfo.status==2 && floatHouseInfo.contractStatus==8">退租</button>-->
            </div>
            <div class="content">
              <div class="house-info" ng-if="floatHouseInfo.contractStatus==-1">
                <div class="line">
                  <div class="line-left" style="text-align: right">租金：</div>
                  <div class="line-right">{{floatHouseInfo.salePrice}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">押金：</div>
                  <div class="line-right">{{floatHouseInfo.depositPrice}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">付款方式：</div>
                  <div class="line-right">{{toPayWayStr(floatHouseInfo.payType)}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">面积：</div>
                  <div class="line-right">{{floatHouseInfo.area}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">房型：</div>
                  <div class="line-right">{{floatHouseInfo.layoutName}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">朝向：</div>
                  <div class="line-right">{{floatHouseInfo.orientationsName}}</div>
                </div>

              </div>
              <!--出租状态下的房间悬浮信息-->
              <div class="contract-info" ng-if="floatHouseInfo.contractStatus>=0">
                <div class="line">
                  <div class="line-left" style="text-align: right">租期：</div>
                  <div class="line-right">
                    {{floatHouseInfo.leaseStart|dateTransfer:'YYYY-MM-DD'}}日<br>
                    至{{floatHouseInfo.leaseEnd|dateTransfer:'YYYY-MM-DD'}}日
                  </div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">承租人：</div>
                  <div class="line-right">{{floatHouseInfo.customerName}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">电话：</div>
                  <div class="line-right">{{floatHouseInfo.customerPhone}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">证件号：</div>
                  <div class="line-right">{{floatHouseInfo.customerCard}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">上次缴租时间：</div>
                  <div class="line-right">
                    {{floatHouseInfo.lastLeaseTime?(floatHouseInfo.lastLeaseTime|dateTransfer:'YYYY-MM-DD'):'无'}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">下次缴租时间：</div>
                  <div class="line-right">
                    {{floatHouseInfo.nextLeaseTime?(floatHouseInfo.nextLeaseTime|dateTransfer:'YYYY-MM-DD'):'无'}}
                  </div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">付款方式：</div>
                  <div class="line-right">{{floatHouseInfo.payWayName}}</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">合同租金：</div>
                  <div class="line-right">{{floatHouseInfo.contractRental}}元/月</div>
                </div>
                <div class="line">
                  <div class="line-left" style="text-align: right">合同押金：</div>
                  <div class="line-right">{{floatHouseInfo.contractDeposit}}元</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
